package ru.niir.goodfil.audit.ui.beans;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import ru.niir.goodfil.audit.service.DefaultConfiguration;

public class HibernateBean {
    private SessionFactory sessionFactory;
    private Session session;

    public HibernateBean() {
        this.sessionFactory = new DefaultConfiguration().getSessionFactory();
        this.session = sessionFactory.openSession();
    }

    public Session getSession() {
        return session;
    }
}
